package com.lucher.mes.dao;

import java.util.List;

import com.lucher.mes.po.Produceproduct;

public interface ProduceproductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Produceproduct record);

    int insertSelective(Produceproduct record);

    Produceproduct selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Produceproduct record);

    int updateByPrimaryKey(Produceproduct record);
    
    //自定义接口
    List<Produceproduct> findByList(Produceproduct record);
    List<Produceproduct> findByListForPage(Produceproduct record);
    int findByCount(Produceproduct record);
    Produceproduct findByBatchno(String batchno);
    Produceproduct findByNfcid(String nfcid);
    Produceproduct findOldestPackByProducecode(String producecode);
    //查询实时产量，根据生产任务编号
    //Integer findProducedCountByProducecode(String producecode);
    //查询质检合格量，根据查询产线编号
    //Integer findQualifiedCountByProducecode(String producecode);
    //查询实时产量，根据生产任务编号
    //Integer findProducedCountByLinecode(String linecode);
    //查询质检合格量，根据查询产线编号
    //Integer findQualifiedCountByLinecode(String linecode);
    
    //查询当天完成量
    Integer findCompletedCountByLinecode(String linecode);
    //查询当天未完成量
    Integer findIncompletedCountByLinecode(String linecode);
    //查询当天报废量
    Integer findWastedCountByLinecode(String linecode);

    //查询当前产线的分包数量
    Integer findPackByProducecode(String producecode);
}